<html>
<head><meta charset="utf-8"><title>RawVec crate · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/RawVec.20crate.html">RawVec crate</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="176848198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/RawVec%20crate/near/176848198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Sydney Acksman <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/RawVec.20crate.html#176848198">(Sep 29 2019 at 00:30)</a>:</h4>
<p>hashbrown has a <code>raw</code> mod if you enable the feature which makes custom hash maps easier to implement. But the std <code>RawVec</code> is locked behind implementation instability, why not separate it into another crate to make custom vecs easier?</p>



<a name="176908902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/RawVec%20crate/near/176908902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/RawVec.20crate.html#176908902">(Sep 30 2019 at 07:19)</a>:</h4>
<p>The <code>RawVec</code> is just something that <code>Vec</code> and <code>Deque</code> need, and it is tailored towards those uses</p>



<a name="176908909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/RawVec%20crate/near/176908909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/RawVec.20crate.html#176908909">(Sep 30 2019 at 07:19)</a>:</h4>
<p>We should probably remove the feature gate since it probably won't be ever exposed at all</p>



<a name="176908915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/RawVec%20crate/near/176908915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/RawVec.20crate.html#176908915">(Sep 30 2019 at 07:19)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="143274">@Amanieu</span> <span class="user-mention" data-user-id="219747">@Simon Sapin</span></p>



<a name="176908965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/RawVec%20crate/near/176908965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/RawVec.20crate.html#176908965">(Sep 30 2019 at 07:20)</a>:</h4>
<p>even changing tiny details like the growth factor would prevent reusing <code>RawVec</code></p>



<a name="176908989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/RawVec%20crate/near/176908989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/RawVec.20crate.html#176908989">(Sep 30 2019 at 07:21)</a>:</h4>
<p>since e.g. the Vec/Deque/etc. make use of knowledge of the precise growth factor, and IIRC deque constrains it</p>



<a name="176909068"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/RawVec%20crate/near/176909068" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/RawVec.20crate.html#176909068">(Sep 30 2019 at 07:22)</a>:</h4>
<p>I don't know why there is a feature that exports it</p>



<a name="176909076"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/RawVec%20crate/near/176909076" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/RawVec.20crate.html#176909076">(Sep 30 2019 at 07:22)</a>:</h4>
<p>there never was an RFC for that AFAIK</p>



<a name="176909110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/RawVec%20crate/near/176909110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/RawVec.20crate.html#176909110">(Sep 30 2019 at 07:23)</a>:</h4>
<p>If someone finds it useful they can just copy&amp;paste <code>RawVec</code> into a different crate, but I don't know of any collection actually using the libstd one, chances are you are going to have to modify <code>RawVec</code> in subtle ways</p>



<a name="176945489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/RawVec%20crate/near/176945489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Sydney Acksman <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/RawVec.20crate.html#176945489">(Sep 30 2019 at 15:51)</a>:</h4>
<p>I noticed it also used by libarena but I don't know where that's used.</p>



<a name="176978923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/RawVec%20crate/near/176978923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/RawVec.20crate.html#176978923">(Sep 30 2019 at 22:03)</a>:</h4>
<p>libarena is just used internally in the compiler</p>



<a name="177712329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/RawVec%20crate/near/177712329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/RawVec.20crate.html#177712329">(Oct 09 2019 at 13:17)</a>:</h4>
<p><span class="user-mention" data-user-id="132920">@gnzlbg</span> there's a feature gate in <code>hashbrown</code>, I don't think there is one for <code>RawVec</code>?</p>



<a name="177714152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/RawVec%20crate/near/177714152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/RawVec.20crate.html#177714152">(Oct 09 2019 at 13:39)</a>:</h4>
<p>I think that for “raw” hash table functionality there is a pre-RFC or similar in internals</p>



<a name="177714177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/RawVec%20crate/near/177714177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/RawVec.20crate.html#177714177">(Oct 09 2019 at 13:39)</a>:</h4>
<p>I don’t recall anything like that for RawVec</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>